class Cat:
    def __init__(self, name):
        self.name = name

    @classmethod
    def speak(cls):
        print('miao')
    @staticmethod
    def speak2():
        print('miao')
    def miao(self):
        print(self.name, 'miaomiao')


#实例属性不能通过类名来调用
cat = Cat('小白')
print(cat.name)
cat.miao()

Cat.speak()
